isSupportedQualifier() need not handle a null argument#7704
isSupportedQualifier() need not handle a null argument#7704mernst wants to merge 1 commit intotypetools:masterfrom
isSupportedQualifier() need not handle a null argument#7704Conversation
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 8 minutes and 54 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java`:
- Around line 3368-3373: Update the Javadoc for
AnnotatedTypeFactory.isSupportedQualifier(AnnotationMirror a) to explicitly
state that the parameter a must be non-null (e.g., "a non-null
AnnotationMirror") and document the NPE behavior (e.g., that the method will
throw NullPointerException if a is null). Keep the return description as-is and
optionally mention that callers should use AnnotationUtils.annotationName(a)
only with non-null inputs; reference the method name
isSupportedQualifier(AnnotationMirror) and the parameter name a in the Javadoc
to make the contract clear.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7c1c27b5-91d4-4ec5-9ba8-d0084136d4ce
📒 Files selected for processing (1)
framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java
No description provided.